<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDwzUrlTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('dwz_url', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('uid')->default('')->comment('用户id');
            $table->string('code')->default('')->comment('域名id');
            $table->integer('domain_id')->comment('域名id');
            $table->integer('qqsafe')->default('0')->comment('qq防红');
            $table->integer('wxsafe')->default('0')->comment('微信防红');
            $table->string('status')->default('1')->comment('状态');
            $table->string('view')->default('0')->comment('访问量');
            $table->string('url')->default('')->comment('跳转地址');
            $table->string('dwz')->default('')->comment('短网址');
            $table->string('ip')->default('');
            $table->string('data')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('dwz_url');
    }
}
